<!-- 钩子函数之页面挂载 -->

<script src="vue.js"></script>

<div id="app">
    <p>{{msg}}</p>
</div>

<script>
    var vue = new Vue({
        el: "#app",
        data: {
            msg: "我又回来了",
        },
        mounted() {
            console.log("页面挂载之后：");
            console.log(this.$el.innerHTML);
        },
        beforeMount() {
            console.log("页面挂载之前：");
            console.log(this.$el.innerHTML);
        }
    })
</script>

<style>

</style>